keys_up
This function returns a list of all the keys on the keyboard that are currently up.
int[] keys_up()
Parameters:
None.
Return value:
An array with the keys that are up, or an empty array if no keys are up or if an error occurs.
Remarks:
The difference between keys_up and keys_released is that keys_released will only return a list of the keys that the user has just released, while keys_up will return a list of the keys that are currently up regardless of whether the same keys have been reported as being up in a previous call.
Example:
// The example will constantly monitor keys that are up. If it registers three or more keys that are not up, it will exit.
void main()
{
show_game_window("Keys up Test");
int[] key_list;
while(key_list.length()>253)
{
key_list=keys_up();
wait(5);
}
}